function extendContext(context, opts) {
    Object.defineProperties(context, {
        [CONTEXT_SESSION]: {
            get() {
                if (this[_CONTEXT_SESSION]) return this[_CONTEXT_SESSION];
                this[_CONTEXT_SESSION] = new ContextSession(this, opts);
                return this[_CONTEXT_SESSION];
            },
        },
        session: {
            get() {
                return this[CONTEXT_SESSION].get();
            },
            set(val) {
                this[CONTEXT_SESSION].set(val);
            },
            configurable: true,
        },
        sessionOptions: {
            get() {
                return this[CONTEXT_SESSION].opts;
            },
        },
    });
}

const CTX_SESS = Symbol('CTX_SESS');

function extend(ctx) {
    Object.defineProperties(ctx, {
        /*[CTX_SESS]: {
            get() {
                return CTX_SESS;
            }
        },
        session: {
            get() {
                return this[CTX_SESS].get();
            },
            set(val) {
                this[CTX_SESS].set(val);
            },
            configurable: true
        }*/
        id:{
            get(){
                return this._id;
            },
            set(val){
                this._id=val;
            }
        }
    });
    return ctx;
}

console.log(extend({}));